<template>
  <div class="goodsdesc-container">
    <h3 class="title">{{ goodsdescinfo.title }}</h3>
    <hr />
    <h3 class="content" v-html="goodsdescinfo.content"></h3>
  </div>
</template>

<script>
export default {
  data() {
    return {
      goodsdescinfo: [],
    };
  },
  props: ["id"],
  created() {
    // console.log(this)
    this.getgoodsdesc();
  },
  methods: {
    async getgoodsdesc() {
      const { data } = await this.$http.get("/api/goods/getdesc/" + this.id);
      console.log(data);
      this.goodsdescinfo = data.message[0];
    },
  },
};
</script>

<style lang="scss">
.goodsdesc-container {
  .title {
    font-size: 16px;
    text-align: center;
    color: cornflowerblue;
  }
  .content {
    img {
      width: 100%;
    }
  } 
}
</style>
